<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        var nums2 = [1, 'b', 2, 'bc', 3, 1, 'bc', 3, 4, 'bc', 5, 4, 'a', 'b', 'ac', 'a'];
        var char2 = prompt("输入以下！")
        var res2 = false;
        for (var i = 0; i < nums2.length; i++) {
            if (nums2[i] == char2) {
                res2 = true;
                break;
            }
        }
        console.log(res2)
    </script>
</body>

</html>